-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[i886] - update logic to fix collection thumbnail bug #2381
Conversation
Test Results 3 files ±0 3 suites ±0 17m 55s ⏱️ +13s For more details on these failures, see this check. Results for commit d0a437f. ± Comparison against base commit 8cf3a6f. This pull request removes 42 and adds 44 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
…athServiceDecorator The default work thumbnail was displaying even though the default collection thumbnail was set. Issue: - scientist-softserv/adventist_knapsack#886 - Updated #call method to use default_collection_image for collection resources when thumbnail_id is blank. - Ensures collections without specific thumbnails use the site-wide default collection image instead of the default work image. - Improved fallback logic to distinguish between collections and works, avoiding issues with collections displaying the work default image.
771c95f
to
7e77eb6
Compare
The failing specs gets resolved by updating Hyrax. ref: #2382 |
…orator` - Added a test for `default_collection_image` to verify it returns the site-specific default collection image when available. - Stubbed `Site.instance` to ensure the spec accurately tests behavior when a site default image is present or absent.
NOTESThis was tested in adventist knapsack as well as hyku demo, and it appears to be working. As an aside, locally I was getting this error when trying to set a thumbnail in Adventist knapsack, but the same error happened when using main (of both adventist knapsack and hyku). This error does not occur in staging or prod so I'm not sure what this is about. To reproduce, spin up main Adventist Knapsack. In the submodule check out this branch. Spin the project up, create a collection. Click the branding tab. Upload and save a thumbnail file. 🤔 |
the spec and lint failure are coming from main so I'm going to go ahead and merge this |
Issue: - #886 ref: - HYKU: samvera/hyku#2381 # When No Collection Branding is Set ## When Default Collection Thumbnail is Set - [ ] Collections should render the default thumbnail ![Screenshot 2024-11-13 at 13-49-38 Show Appearance __ Hyku](https://github.com/user-attachments/assets/e569edc4-4ae7-4117-bd2c-86259054aab1) ![Screenshot 2024-11-13 at 13-50-18 Collections](https://github.com/user-attachments/assets/58f5a5eb-e693-4afc-aa43-a02d21e47b71) ## When Default Collection Thumbnail is NOT set - [ ] Collections should render Hyrax's default thumbnail ![Screenshot 2024-11-13 at 13-50-54 Show Appearance __ Hyku](https://github.com/user-attachments/assets/29a74933-c7f1-40b5-b20d-a46fe28bd1da) ![Screenshot 2024-11-13 at 13-51-05 Collections](https://github.com/user-attachments/assets/ce945c3b-41c8-4a4d-b22b-6e5fd79dddce) # When Collection Branding is Set ## When Default Collection Thumbnail is Set - [ ] Collections should render the Branding thumbnail ![Screenshot 2024-11-13 at 13-50-37 Edit User Collection es __ Hyku](https://github.com/user-attachments/assets/78569507-1f36-4c99-8879-fd391b4929f6) ![Screenshot 2024-11-13 at 15-40-53 Collections](https://github.com/user-attachments/assets/fe0b7100-0404-43b1-a074-d26fa4f3fea9)
The default work thumbnail was displaying even though the default collection thumbnail was set.
Issue:
When No Collection Branding is Set
When Default Collection Thumbnail is Set
When Default Collection Thumbnail is NOT set
When Collection Branding is Set
When Default Collection Thumbnail is Set